Skip to content

[libc][NFC] Eliminate the internal header library target. #65837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

sivachandra
Copy link
Collaborator

The internal header library target with name suffix .__header_library
has been removed as it serves no purpose now. It was added to make older
versions of CMake happy.

The internal header library target with name suffix `.__header_library`
has been removed as it serves no purpose now. It was added to make older
versions of CMake happy.
@sivachandra sivachandra requested a review from a team as a code owner September 9, 2023 05:51
@llvmbot llvmbot added the libc label Sep 9, 2023
@llvmbot
Copy link
Member

llvmbot commented Sep 9, 2023

@llvm/pr-subscribers-libc

Changes
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 8ffe2d3b739926c..40a4cf647762e1d 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -175,27 +175,19 @@ function(create_header_library fq_target_name)
       endforeach()
     endif()
   endif()
-  set(interface_target_name "${fq_target_name}.__header_library__")
  • add_library(${interface_target_name} INTERFACE)
  • target_sources(${interface_target_name} INTERFACE ${FULL_HDR_PATHS})
  • add_library(${fq_target_name} INTERFACE)
  • target_sources(${fq_target_name} INTERFACE ${FULL_HDR_PATHS})
    if(ADD_HEADER_DEPENDS)
  • add_dependencies(${interface_target_name} ${ADD_HEADER_DEPENDS})
  • add_dependencies(${fq_target_name} ${ADD_HEADER_DEPENDS})
    endif()
  • set_target_properties(
  • ${interface_target_name}
  • PROPERTIES
  •  INTERFACE_FLAGS "${ADD_HEADER_FLAGS}"
    
  • )
    if(ADD_HEADER_COMPILE_OPTIONS)
  • target_compile_options(${interface_target_name} INTERFACE ${ADD_HEADER_COMPILE_OPTIONS})
  • target_compile_options(${fq_target_name} INTERFACE ${ADD_HEADER_COMPILE_OPTIONS})
    endif()
  • add_custom_target(${fq_target_name})
  • add_dependencies(${fq_target_name} ${interface_target_name})
    set_target_properties(
    ${fq_target_name}
    PROPERTIES
  •  INTERFACE_FLAGS "${ADD_HEADER_FLAGS}"
     TARGET_TYPE "${HDR_LIBRARY_TARGET_TYPE}"
     DEPS "${ADD_HEADER_DEPENDS}"
     FLAGS "${ADD_HEADER_FLAGS}"
    

@sivachandra sivachandra merged commit eb06125 into llvm:main Sep 11, 2023
@sivachandra sivachandra deleted the remove_intermediate_target_of_header_libraries branch September 13, 2023 16:14
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
The internal header library target with name suffix `.__header_library`
has been removed as it serves no purpose now. It was added to make older
versions of CMake happy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants